﻿Public Class calculator
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btn_Calculate_Click(sender As Object, e As EventArgs) Handles btn_Calculate.Click
        Dim firstNumber As Integer
        Dim secondNumber As Integer
        Dim result As Integer

        firstNumber = CInt(tb_FirstNumber.Text)
        secondNumber = CInt(tb_SecondNumber.Text)

        result = firstNumber + secondNumber

        lbl_Result.Text = result

    End Sub

    Protected Sub btn_minus_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_minus.Click
        Dim firstNumber As Integer
        Dim secondNumber As Integer
        Dim result As Integer

        firstNumber = CInt(tb_FirstNumber.Text)
        secondNumber = CInt(tb_SecondNumber.Text)

        result = firstNumber - secondNumber

        lbl_Result.Text = result

    End Sub

    Protected Sub btn_times_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_times.Click
        Dim firstNumber As Integer
        Dim secondNumber As Integer
        Dim result As Integer

        firstNumber = CInt(tb_FirstNumber.Text)
        secondNumber = CInt(tb_SecondNumber.Text)

        result = firstNumber * secondNumber

        lbl_Result.Text = result
    End Sub

    Protected Sub btn_divide_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_divide.Click
        Dim firstNumber As Integer
        Dim secondNumber As Integer
        Dim result As Integer

        firstNumber = CInt(tb_FirstNumber.Text)
        secondNumber = CInt(tb_SecondNumber.Text)

        result = firstNumber / secondNumber

        lbl_Result.Text = result
    End Sub

    Protected Sub btn_powerOf_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_powerOf.Click
        Dim firstNumber As Integer
        Dim secondNumber As Integer
        Dim result As Integer

        firstNumber = CInt(tb_FirstNumber.Text)
        secondNumber = CInt(tb_SecondNumber.Text)

        result = firstNumber ^ secondNumber

        lbl_Result.Text = result
    End Sub
End Class